/*********************************************************************
	Rhapsody	: 7.6.1 
	Login		: jlor
	Component	: DefaultComponent 
	Configuration 	: CodeConfig
	Model Element	: Reactor
//!	Generated Date	: Fri, 7, Sep 2012  
	File Path	: DefaultComponent\CodeConfig\Reactor.h
*********************************************************************/

#ifndef Reactor_H
#define Reactor_H

//#[ ignore
#ifdef _MSC_VER
// disable Microsoft compiler warning (debug information truncated)
#pragma warning(disable: 4786)
#endif
//#]

//## auto_generated
#include <oxf.h>
//## auto_generated
#include <string>
//## auto_generated
#include <algorithm>
//## auto_generated
#include "Default.h"
//## auto_generated
#include "Windows.h"
//## auto_generated
#include <list>
//## auto_generated
#include <iterator>
//## link itsEventHandler
#include "EventHandler.h"
//## link itsEHANDLE
#include "EHANDLE.h"
#include "OMValueCompare.h"
//## auto_generated
#include <map>

//## dependency SimulatorReactorImplementation
class SimulatorReactorImplementation;

//## package Default

//## class Reactor
class Reactor {
    ////    Constructors and destructors    ////
    
public :

    //## auto_generated
    virtual ~Reactor();
    
    ////    Operations    ////
    
    //## operation handleEvents(int)
    virtual void handleEvents(int time = 0);
    
    //## operation instance()
    static Reactor * instance();
    
    //## operation registerHandler(EventHandler,Event_Type)
    virtual void registerHandler(EventHandler& eh, const Event_Type& dt);
    
    //## operation removeHandler(EventHandler,Event_Type)
    void removeHandler(EventHandler& eh, const Event_Type& et);
    
    ////    Additional operations    ////
    
    ////    Attributes    ////

protected :

    static Reactor* reactor_impl_;		//## attribute reactor_impl_
    
    ////    Relations and components    ////

public :

    //## operation Reactor()
    Reactor();
    
    //## operation registerHandler(EHANDLE,EventHandler,Event_Type)
    virtual void registerHandler(EHANDLE& h, EventHandler& eh, const Event_Type& et);
    
    //## operation removeHandler(EHANDLE,Event_Type)
    void removeHandler(EHANDLE& h, const Event_Type& et);
    
    //## auto_generated
    std::map<Event_Type, EventHandler*>::const_iterator getItsEventHandler() const;
    
    //## auto_generated
    std::map<Event_Type, EventHandler*>::const_iterator getItsEventHandlerEnd() const;
    
    //## auto_generated
    void removeItsEventHandler(EventHandler* p_EventHandler);
    
    //## auto_generated
    void clearItsEventHandler();

protected :

    //## auto_generated
    void cleanUpRelations();
    
    std::map<Event_Type, EventHandler*> itsEventHandler;		//## link itsEventHandler

public :

    //## auto_generated
    void _removeItsEventHandler(EventHandler* p_EventHandler);
    
    //## auto_generated
    void _clearItsEventHandler();
    
    //## auto_generated
    std::list<EHANDLE*>::const_iterator getItsEHANDLE() const;
    
    //## auto_generated
    std::list<EHANDLE*>::const_iterator getItsEHANDLEEnd() const;
    
    //## auto_generated
    void addItsEHANDLE(EHANDLE* p_EHANDLE);
    
    //## auto_generated
    void removeItsEHANDLE(EHANDLE* p_EHANDLE);
    
    //## auto_generated
    void clearItsEHANDLE();

protected :

    std::list<EHANDLE*> itsEHANDLE;		//## link itsEHANDLE

public :

    //## auto_generated
    EventHandler* getItsEventHandler(Event_Type key) const;
    
    //## auto_generated
    void removeItsEventHandler(Event_Type key);

private :

    //## auto_generated
    static void setReactor_impl_(Reactor* p_reactor_impl_);

public :

    //## auto_generated
    void _removeItsEventHandler(Event_Type key);
    
    //## auto_generated
    void addItsEventHandler(Event_Type key, EventHandler* p_EventHandler);
    
    //## auto_generated
    void _addItsEventHandler(Event_Type key, EventHandler* p_EventHandler);
};

////    Constructors and destructors    ////

////    Operations    ////

////    Additional operations    ////

////    Attributes    ////

#endif
/*********************************************************************
	File Path	: DefaultComponent\CodeConfig\Reactor.h
*********************************************************************/
